package com.yqg.education.mapper;

import com.yqg.education.entity.Examquestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Mapper
public interface ExamquestionMapper extends BaseMapper<Examquestion> {

    List<Long> getQuestionIdByExampaperId(@Param("exampaperId") Long exampaperId);

    @Select("SELECT score FROM examquestion WHERE question_id = #{questionId} and exampaper_id = #{exampaperId}")
    BigDecimal getScoreByQuestionId(@Param("questionId") Long questionId, @Param("exampaperId") Long exampaperId );
}
